package com.jiyun.feign;

import com.jiyun.entity.day07.Training;
import com.jiyun.vo.ResponseBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

@FeignClient("day14-training")
public interface TrainingFeign {
    @RequestMapping("/findByName")
    public ResponseBean findByName();

    @RequestMapping("/findTrainingNewTime")
    ResponseBean findTrainingNewTime();

    @RequestMapping("findByAll")
    ResponseBean findByAll(@RequestBody Training training);

    @RequestMapping("findByTrainingId")
    ResponseBean findByTrainingId(@RequestParam("id") Integer id);

    @RequestMapping("/addUserTraining")
     ResponseBean addUserTraining(@RequestParam("id") Integer id);
    /**
     * 根据redis中的用户查询数据
     * @return
     */
    @RequestMapping("/findTrainingByUser")
     ResponseBean findTrainingByUser();
}
